﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;

using EventMonitor.Windows;


namespace EventMonitor
{
	public partial class NotificationIconWrapper : Component
	{
		public NotificationIconWrapper()
		{
			InitializeComponent();
			this.EventLogMenu.Click += EventLogMenu_Click;
			this.ExitMenu.Click += ExitMenu_Click;
			this.HealthMonitoringMenu.Click += HealthMonitoringMenu_Click;
			this.OptionsMenu.Click += OptionsMenu_Click;
		}

		public NotificationIconWrapper(IContainer container)
		{
			container.Add(this);

			InitializeComponent();

		}


		#region " Event Handlers "

		void EventLogMenu_Click(object sender, EventArgs e)
		{
			EventLogWindow window = new EventLogWindow();
			window.Show();
			window.Activate();
		}

		void ExitMenu_Click(object sender, EventArgs e)
		{
			System.Windows.Application.Current.Shutdown();
		}

		void HealthMonitoringMenu_Click(object sender, EventArgs e)
		{
			HealthMonitoringWindow window = new HealthMonitoringWindow();
			window.Show();
			window.Activate();
		}

		void OptionsMenu_Click(object sender, EventArgs e)
		{
			OptionsWindow window = new OptionsWindow();
			window.Show();
			window.Activate();
		}

		#endregion
	}
}
